 #!/usr/bin/env bash

# 创建组账号：kyadmin  GID 9527

KYADMIN_GID=`egrep "^kyadmin" /etc/group |awk -F: '{print $3}'`
if [ $KYADMIN_GID  -eq 9527 ];then
       KYGID=1
else
       KYGID=0
fi


KYADMIN_MEMBER=`egrep "^kyadmin" /etc/group|awk -F: '{print $NF}'`
echo $KYADMIN_MEMBER
#if [ "$KYADMIN_MEMBER" == "kylin_user03" ];then
#	KYM=1
#else
#	KYM=0
#fi

if [ $KYGID -eq 1 ];then
	echo true
else
	echo false
fi

# 修改ssh组账号：GID为300
SSH_GID=`egrep -w "^ssh" /etc/group|awk -F: '{print $3}'`

if [ $SSH_GID  -eq 300 ];then
	echo true
else
	echo false
fi


#删除组账号：staff
egrep "staff" /etc/group >/dev/null 2>&1
if [ $? -eq 1 ];then
	echo true
else
	echo false
fi